<?php
/**
 * 描述：会员管理中心-匹配的采购信息。
 * @final
 */
final class Exec_MC_Transaction_Seller_Procurement_List extends Exec_MC_Master
{   
    public function Get()
    {
        #获取参数
        $keywords=trim(Functions::UrlArgs('keywords'));
        if(strlen($keywords)>200){
            return;
        }

        #获取数据
        $sql='select * from procurement where Account=? order by Datetime desc limit ?,15';
        $data=DB::PGetData($sql,array
        (
            Account::Session('Username')
        ));
        
        foreach($data['Record'] as $key=>$value)
        {
            $data['Record'][$key]['ThumbnailPath']=Config::PATH_RELATIVE_ATTACHMENT_PROCUREMENT.'/'.$data['Record'][$key]['ThumbnailPath'];
        }

        #渲染模板
        View::Assign('Supplies',$data['Record']);
        View::Assign('PageMenu',PagerFactory::Create('Common')->Fetch($data,array('URL'=>'exec.php?action=mc_procurement_list','IsDetail'=>TRUE,'Parameters'=>array('keywords'=>$keywords))));
        $this->MasterPage_Display(View::Fetch('mc/transaction/seller/procurement/list.tpl'));
    }
}
?>